package com.gongpingjialoan.activity.loans;

import android.os.Bundle;
import android.view.View;

import com.gongpingjialoan.R;
import com.gongpingjialoan.activity.main.BaseActivity;
import com.gongpingjialoan.api.Piont;
import com.gongpingjialoan.bean.VipBuycarBean;
import com.gongpingjialoan.manage.PointRecordManage;
import com.gongpingjialoan.view.LoanCarModelView;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;

/**
 * 正在审核
 */
public class LoanVerificationActivity extends BaseActivity implements View.OnClickListener {

    private LoanCarModelView car_mode_layout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loan_verification);
        EventBus.getDefault().register(this);
        initView();
    }

    private void initView() {
        setTitle("正在审核");
        PointRecordManage.getInstance().addPoint(mySelf, Piont.LoanReviewView);
        car_mode_layout = (LoanCarModelView) findViewById(R.id.car_mode_layout);
    }

    @Subscribe
    public void onEventMainThread(VipBuycarBean vipBuycarBean) {
        car_mode_layout.onBrandSelceted(vipBuycarBean);
    }

    @Override
    public void onClick(View v) {
    }

    @Override
    public void finish() {
        super.finish();
        PointRecordManage.getInstance().addPoint(mySelf, Piont.LoanReviewBack);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }
}
